﻿using Microsoft.Extensions.DependencyInjection;
using RxxApi.Extensions.HostedService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RxxApi.Extensions.ServiceExtensions;

public static class InitializationHostServiceSetup
{
    /// <summary>
    /// 应用初始化服务注入
    /// </summary>
    /// <param name="services"></param>
    public static void AddInitializationHostServiceSetup(this IServiceCollection services)
    {
        if (services == null) throw new ArgumentNullException(nameof(services));

        services.AddHostedService<SeedDataHostedService>();
    }
}
